package cn.source.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author tubo
 * @date 2024/06/13 11:36
 */
@Getter
@AllArgsConstructor
public enum CommPayEnum {
    /**
     * payType
     */
    ALI_PAY("AliPay", "支付宝"),
    WX_APP_PAY("WXPay", "微信"),
    WX_JS_PAY("WXMpPay", "微信公众号"),
    BZ_PAY("BZPay", "余额支付"),
    WX_H5_PAY("WechatH5Pay", "微信H5支付"),
    ;
    private final String code;
    private final String desc;

    public static CommPayEnum getPayType(String code) {
        for (CommPayEnum value : CommPayEnum.values()) {
            if (value.code.equals(code)) {
                return value;
            }
        }
        return null;
    }
}
